package com.gzhu.knowledgeAdmin.entity;


import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.Date;


//任务表
@Entity
@EntityListeners(AuditingEntityListener.class)
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Table(name = "t_rw_t")
public class TRwT {

    @Id
    @TableId
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long fRwid;

    @ApiModelProperty("公司id")
    private String fGsid;

//    @ApiModelProperty("任务id")
//    private Long fRwid;

    @ApiModelProperty("任务名称")
    private String fRwmc;

    @ApiModelProperty("任务描述")
    private String fRwms;

    @ApiModelProperty("任务建立人")
    private String fRwjlr;

    @CreatedDate
    @ApiModelProperty("任务建立时间")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fRwjlsj;

    @ApiModelProperty("任务状态")
    private Integer fRwzt;

    @ApiModelProperty("客户业务流程")
    private Integer fYwlcid;

    @ApiModelProperty("任务导入类型")
    private String fRwdrlx;

    @ApiModelProperty("任务总量")
    private Integer fRwzl;

    @ApiModelProperty("任务剩余量")
    private Integer fRwsyl;

    @ApiModelProperty("任务类型")
    private Integer fRwlx;

    @ApiModelProperty("语音类型")
    private Integer fYylx;

    @ApiModelProperty("语音模型")
    private Integer fYymx;

    @ApiModelProperty("话术模板类型")
    private Integer fHsmblx;

    @ApiModelProperty("话术模板id")
    private Integer fHsmbid;

    @ApiModelProperty("任务并发数（机器人数量）")
    private Integer fRwbfs;

    @ApiModelProperty("外显规则")
    private Integer fWxgz;

    @ApiModelProperty("外显号码")
    private String fWxhm;

    @ApiModelProperty("号码隐藏方式")
    private Integer fHmycfs;

    @ApiModelProperty("定时启动时间")
    private String fDsqdsj;

    @ApiModelProperty("任务优先？0：否；1：是")
    private Integer fRwyx;

    @ApiModelProperty("任务启动方式")
    private Integer fRwqdfs;


    @ApiModelProperty("任务开始日期")
    private LocalDateTime fRwksrq;

    @ApiModelProperty("任务结束日期")
    private LocalDateTime fRwjsrq;

    @ApiModelProperty("任务外呼周日")
    private String fRwwhweek;

    @ApiModelProperty("任务外呼时间")
    private String fRwwhsj;

    @ApiModelProperty("未接重呼")
    private Integer fWjch;

    @ApiModelProperty("未接重呼条件")
    private String fWjchtj;

    @ApiModelProperty("接通重呼")
    private Integer fJtch;

    @ApiModelProperty("接通重呼条件")
    private String fJtchtj;

    @ApiModelProperty("发送挂机短信")
    private Integer fGjdx;

    @ApiModelProperty("挂机短信条件")
    private String fGjdxtj;

    @ApiModelProperty("分配客户加微信")
    private Integer fFpkhwx;

    @ApiModelProperty("分配客户加微信条件")
    private String fFpkhwxtj;

    @ApiModelProperty("接通转接类型")
    private Integer fJtzjlx;

    @ApiModelProperty("接通转人工条件")
    private String fJtzjtj;

    @ApiModelProperty("任务回调接口")
    private String fRwhdjk;

    @ApiModelProperty("通话节点回调接口")
    private String fThjdhdjk;

    @ApiModelProperty("挂机短信回调接口")
    private String fGzdxhdjk;

    @ApiModelProperty("外呼排序方式")
    private Integer fWhpxfs;

    @ApiModelProperty("优先外呼")
    private Integer fYxwh;

    @ApiModelProperty("录音播放次数")
    private Integer fLybfcs;

    @ApiModelProperty("播放间隔时长")
    private Integer fBfjgsc;


//    public boolean needReschedule(TRwT nJob) {
//        // 检测到cron发生变化，需要调度
//        if (!this.cron.equals(nJob.getCron()) || !this.taskName.equals(nJob.getTaskName())) {
//            return true;
//        }
//        return false;
//    }




}
